<?php
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'BI TOOL',

// preloading 'log' component
	'preload'=>array('log'),

// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
),

	'defaultController'=>'article/index',

// application components
	'components'=>array(
		'user'=>array(
// enable cookie-based authentication
			'allowAutoLogin'=>true,
),
		'db' => array(
                        'connectionString' => 'mysql:host=localhost;dbname=biyeudb',
                        'emulatePrepare' => true,
                        'username' => 'root',
                        'password' => '',
                        'charset' => 'utf8',
                        'queryCacheID' => true,
                        'enableProfiling' => true,
                        'schemaCachingDuration' => 3600,
                        'persistent'=>true,
),

		'errorHandler'=>array(
// use 'site/error' action to display errors
            'errorAction'=>'test/error',
),
        'urlManager'=>array(
        	'urlFormat'=>'path',
        	'rules'=>array(
        		'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
/*
 array(
 'class'=>'CWebLogRoute',
 ),
 */
),
),
),
// modules settings
        'modules' => array(
                'gii' => array(
                        'class' => 'system.gii.GiiModule',
                        'password' => '123456',
//'ipFilters' => array('127.0.0.1')
)
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
	'params' => array(
                'siteUrl'=>'demo.local',
                'status'=>array(0=>'Not Ok', 1=>'OK'),
								'patternTypes'=>array(0=>'DOM', 1=>'REGEX'),
								'imgArticleThumbWidth'=>160,
								'userRole'=>array(0=>'Thành viên',1=>'Biên tập',2=>'Quản trị'),
),
);